<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:69:"F:\liudian\fly_forum\public/../application/admin\view\Conf\index.html";i:1520384633;s:53:"F:\liudian\fly_forum\application\admin\view\base.html";i:1520384633;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title><?php echo $title; ?></title>
    <link rel="stylesheet" href="/fly_forum/public/static/layui/css/layui.css">
    <script src="/fly_forum/public/static/jq1.8.3.mini.js"></script>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo"><?php echo $title; ?></div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="<?php echo url('Index/index'); ?>">网站后台</a></li>
            <li class="layui-nav-item"><a href="<?php echo url('User/index'); ?>">用户中心</a></li>
            <li class="layui-nav-item"><a href="<?php echo url('Card/index'); ?>">帖子列表</a></li>
            <li class="layui-nav-item"><a href="<?php echo url('Conf/index'); ?>">系统设置</a></li>
            <!--<li class="layui-nav-item">-->
                <!--<a href="javascript:;">其它系统</a>-->
                <!--<dl class="layui-nav-child">-->
                    <!--<dd><a href="">邮件管理</a></dd>-->
                    <!--<dd><a href="">消息管理</a></dd>-->
                    <!--<dd><a href="">授权管理</a></dd>-->
                <!--</dl>-->
            <!--</li>-->
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item"><a href="<?php echo url('Index/Index/index'); ?>">网站首页</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    <?php echo $admin['name']; ?>
                </a>
                <dl class="layui-nav-child">
                    <!-- <dd><a href="">基本资料</a></dd> -->
                    <dd><a href="<?php echo url('Conf/pwd'); ?>">修改密码</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="<?php echo url('Logindo/loginout'); ?>">退出</a></li>
        </ul>
    </div>

    
<div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree"  lay-filter="test">
            <li class="layui-nav-item layui-nav-itemed">
                <a class="" href="javascript:;">基本设置</a>
                <dl class="layui-nav-child">
                    <dd><a href="<?php echo url('Conf/index'); ?>">网站信息</a></dd>
                    <dd><a href="<?php echo url('Conf/pwd'); ?>">修改密码</a></dd>
            </li>
            <li class="layui-nav-item layui-nav-itemed">
                <a href="javascript:;">友情链接</a>
                <dl class="layui-nav-child">
                    <dd><a href="<?php echo url('Conf/linkAdd'); ?>">添加友链</a></dd>
                    <dd><a href="<?php echo url('Conf/link'); ?>">友链列表</a></dd>
                </dl>
            </li>
        </ul>
    </div>
</div>


    
<div class="layui-body">
    <div class="layui-tab" style="margin-left: 20px;margin-top: 20px">
      <ul class="layui-tab-title">
        <li class="layui-this">网站设置</li>
        <li>优化推广</li>
        <li>第三方登录</li>
        <li>其他第三方</li>
        <li>邮箱设置</li>
      </ul>
      <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <h1>网站设置</h1>
            <form class="layui-form" action="<?php echo url('Conf/setup1'); ?>" style="margin-top: 20px" method="post">
                  <div class="layui-form-item">
                    <label class="layui-form-label">备案号：</label>
                    <div class="layui-input-inline">
                      <input type="text" name="record_number" required  lay-verify="required" autocomplete="off" class="layui-input" style="width: 350px" value="<?php echo RECORD_NUMBER; ?>">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">站长邮箱：</label>
                    <div class="layui-input-inline">
                      <input type="text" name="zz_email" required  lay-verify="required" autocomplete="off" class="layui-input" style="width: 350px" value="<?php echo ZZ_EMAIL; ?>">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <div class="layui-input-block">
                      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
        <div class="layui-tab-item">
            <h1>优化推广</h1>
            <form class="layui-form" action="<?php echo url('Conf/setup2'); ?>" style="margin-top: 20px" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">网站名称：</label>
                        <div class="layui-input-inline">
                          <input type="text" name="web_name" required  lay-verify="required"  autocomplete="off" class="layui-input" style="width: 350px" value="<?php echo WEB_NAME; ?>">
                        </div>
                     </div>
                    <div class="layui-form-item layui-form-text">
                      <label class="layui-form-label">网站关键字：</label>
                      <div class="layui-input-inline">
                        <textarea name="web_keywords"  class="layui-textarea" style="width: 350px" ><?php echo WEB_KEYWORDS; ?></textarea>
                      </div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">网站描述</label>
                        <div class="layui-input-inline">
                          <textarea name="web_description"  class="layui-textarea" style="width: 350px"><?php echo WEB_DESCRIPTION; ?></textarea>
                        </div>
                    </div>

                  <div class="layui-form-item">
                    <div class="layui-input-block">
                      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>


        </div>
        <div class="layui-tab-item">
            <h1>第三方登录</h1>
            <form class="layui-form" action="<?php echo url('Conf/setup3'); ?>" method="post" style="margin-top: 20px">
                  <div class="layui-form-item">
                    <label class="layui-form-label">QQ登录APP ID：</label>
                    <div class="layui-input-inline">
                      <input type="text" name="qq_id" required  lay-verify="required"  autocomplete="off" class="layui-input" style="width: 350px" value="<?php echo QQ_ID; ?>">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">QQ登录APP KEY：</label>
                    <div class="layui-input-inline">
                      <input type="text" name="qq_key" required  lay-verify="required"  autocomplete="off" class="layui-input" style="width: 350px" value="<?php echo QQ_KEY; ?>">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <div class="layui-input-block">
                      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
        <div class="layui-tab-item">
            <h1>其他第三方</h1>
            <form class="layui-form" action="<?php echo url('Conf/setup4'); ?>" method="post" style="margin-top: 20px">
                  <div class="layui-form-item">
                    <label class="layui-form-label">百度推送site提交链接：</label>
                    <div class="layui-input-inline">
                      <input type="text" name="baidu_site" required  lay-verify="required"  autocomplete="off"  style="width: 350px" class="layui-input" value="<?php echo BAIDU_SITE; ?>">
                    </div>
                  </div>
                  <div class="layui-form-item layui-form-text">
                      <label class="layui-form-label">第三方统计代码：</label>
                      <div class="layui-input-inline">
                        <textarea name="statistics"  class="layui-textarea" style="width: 350px"><?php echo STATISTICS; ?></textarea>
                      </div>
                    </div>
                  <div class="layui-form-item">
                    <div class="layui-input-block">
                      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
        <div class="layui-tab-item">
            <h1>邮箱设置</h1>
            <form class="layui-form" action="<?php echo url('Conf/setup5'); ?>" method="post" style="margin-top: 20px" id='handlepost'>
                  <div class="layui-form-item">
                    <label class="layui-form-label">SMTP服务器：</label>
                    <div class="layui-input-inline">
                      <input type="text" name="email_smtp" required  lay-verify="required"  autocomplete="off" class="layui-input" style="width: 350px" value="<?php echo EMAIL_SMTP; ?>" >
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">邮箱账号：</label>
                    <div class="layui-input-inline">
                      <input type="text" name="email_name" required  lay-verify="required"  autocomplete="off" class="layui-input" style="width: 350px" value="<?php echo EMAIL_NAME; ?>">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">邮箱安全码：</label>
                    <div class="layui-input-inline">
                      <input type="text" name="email_pwd" required  lay-verify="required"  autocomplete="off" class="layui-input" style="width: 350px" value="<?php echo EMAIL_PWD; ?>">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">发件人名称：</label>
                    <div class="layui-input-inline">
                      <input type="text" name="email_nickname" required  lay-verify="required"  autocomplete="off" class="layui-input" style="width: 350px" value="<?php echo EMAIL_NICKNAME; ?>">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <label class="layui-form-label">收件人邮箱:</label>
                    <div class="layui-input-inline">
                      <input type="text" name="mail_to" id="mail_to" required  lay-verify="required"  autocomplete="off" class="layui-input" style="width: 350px"  >
                      <input type="button" onClick="javascript:test_mail();" value="测试" name="send_test_email" class="input-btn" id="send_test_email">
                    </div>
                  </div>
                  <div class="layui-form-item">
                    <div class="layui-input-block">
                      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
      </div>
    </div>  
</div>
<script> </script>

<script>
function test_mail() {
    var email = $('#mail_to').val();
    if (email == '') {
        layer.alert("请填写正确的测试邮箱账号！",{icon:2});
        return;
    } else {
        $.ajax({
            type: "post",
            data: $('#handlepost').serialize(),
            dataType: 'json',
            url: "<?php echo url('conf/public_test_mail','',''); ?>",
            success: function (res) {
                if (res.status == 1) {
                    alert('发送成功');
                } else {
                    alert('发送失败');

                }
            }
        })
    }
}
</script>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © lay论坛
    </div>
</div>
<script src="/fly_forum/public/static/layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
</script>
</body>
</html>